import http from "../http";
import {reactive} from "vue";

const navvvv = reactive({
  data: [], // 头部导航列表
  catedata:null,
  coursedata:null,
  get_header_navvvv(){
    // 获取头部导航菜单
    return http.get("/home/nav/catrgory/").then(response=>{
      // console.log(response);
      this.data = response.data.data;
      console.log(this.data);
    })
  },
  get_header_type(id){
    // 获取头部导航菜单
    return http.get("/home/nav/catrgory/"+id+"/").then(response=>{
      // console.log(response);
      
      this.catedata=response.data.data.catedata;
      this.coursedata=response.data.data.coursedata;
      console.log(this.catedata,"----")
      console.log(this.coursedata,"---+++")
    })
  },

}
)

export default navvvv;